package org.example.exp3.exam5;

public class WordCount implements StatisticObserver {
   private EditableTextArea textArea;

   public void update() {
      System.out.println("当前文本：" + textArea.getStr().toString() + " 更新第二个文本信息统计！");
   }

   public Editor getTextArea() {
      return textArea;
   }

   public void setTextArea(EditableTextArea textArea) {
      this.textArea = textArea;
   }
}